package com.whirl.util;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.NumberUtil;

public class NumUtils {

    /**
     *
     * @param number 数字
     * @return 返回两位小数的double
     */
    public static double stringToDoubleWithTwoDecimal(Object number){
        return Convert.convert(Double.class, NumberUtil.round(Convert.convert(Double.class,number),2));
    }
}
